package com.gjzhao.fmmall.controller;

import com.gjzhao.fmmall.entity.Users;
import com.gjzhao.fmmall.service.UserAddService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 用户注册 Controller
 * @Author: gjzhao
 * @Date Created in 2022-02-12 11:21 下午
 */
@RestController
public class UserAddController {

    @Autowired
    private UserAddService userAddService;


    //添加用户
    @PostMapping("user/add")
    public int add(@RequestBody Users user) {
        int i = userAddService.add(user);
        return i;
    }
}
